import QtQuick 2.12
import QtQuick.Window 2.12

Image {
    id: root
    source: "../images/background.png"
    property int padding: 40
    property bool running: false
    Image {
        width: 150;height: 150
        id: qq
        source: "../images/qq.png"
        x: root.padding
        y: (root.height-height)/2
        //x轴移动
        NumberAnimation/*PropertyAnimation*/ on x{
            to:root.width-qq.width-root.padding
            duration: 3000
            running: root.running
        }
        //旋转360度
        RotationAnimation/*PropertyAnimation*/ on rotation{
            to:720
            duration: 3000
            running: root.running
        }
        //增加透明度
        NumberAnimation/*PropertyAnimation*/ on opacity{
            to:0.5
            duration: 3000
            running: root.running
        }
    }
    MouseArea{
        anchors.fill: parent
        onClicked: root.running=true
    }
}
